package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 卡卷分享明细
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_card_info_share_detail")
public class CardInfoShareDetail extends Model<CardInfoShareDetail> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "share_id", type = IdType.ASSIGN_ID)
    private String shareId;
    /**
     * 卡卷ID
     */
    @TableField("card_id")
    private String cardId;
    /**
     * 分享人ID
     */
    @TableField("share_user_id")
    private String shareUserId;
    /**
     * 分享人手机号
     */
    @TableField("share_mobile")
    private String shareMobile;
    /**
     * 领取人ID
     */
    @TableField("received_user_id")
    private String receivedUserId;
    /**
     * 领取人手机号
     */
    @TableField("received_mobile")
    private String receivedMobile;
    /**
     * 分享时间
     */
    @TableField("share_time")
    private LocalDateTime shareTime;
    /**
     * 领取时间
     */
    @TableField("received_time")
    private LocalDateTime receivedTime;
    /**
     * 计划ID
     */
    @TableField("plan_id")
    private String planId;
    /**
     * 卷信息
     */
    @TableField("card_msg_id")
    private String cardMsgId;

    public void freeData() {
        this.shareId = null;
        this.cardId = null;
        this.shareUserId = null;
        this.shareMobile = null;
        this.receivedUserId = null;
        this.receivedMobile = null;
        this.shareTime = null;
        this.receivedTime = null;
        this.planId = null;
        this.cardMsgId = null;
    }
}
